package com.controller;

import com.pojo.Dep;
import com.service.IDepService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SuppressWarnings("ALL")
public class DepController {

    @Autowired
    private IDepService depService;

    @RequestMapping("/addDep")
    public String addDep(Dep dep){
        depService.addDep(dep);
        return "success";
    }

    @RequestMapping("/depByIdDep")
    public String depByIdDep(Integer id){
        depService.delByIdDep(id);
        return "删除成功";
    }


}
